﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AppPort;
using Controllers;
using MongoDB.Securety;

namespace TI_App
{
    /// <summary>
    /// Summary description for ControllerPort
    /// </summary>
    public class ControllerPort : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            var p = ((MongoDB.Securety.MongoMembershipProvider)System.Web.Security.Membership.Provider);

            AppPortConveyor service = new AppPortConveyor(
                                                           p.getCurrentConnectionString (),
                                                           context,
                                                           ControllerFactory.GetNotificationController ()
                                                          );
            service.ProcessRequest();
   
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
        
    }

}